Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clock board i2c interface #443

Draft
wants to merge 15 commits into
base: staging
Choose a base branch
from

Conversation

hiddemoll
Copy link
Contributor

@hiddemoll hiddemoll commented Dec 1, 2023

This PR aims to program the clock chip on the FMC board.

We currently use the Skyworks Si5395J-A-EVB board as our external clock with frequecy adjustment. We also have a Trenz Electronic TEF0008 FMC, which we use for its 4 SFP ports. This board has a similar low jitter programmable clock generator (Si5345-D), but using this clock generator requires some changes.

The two major differences are programming the clock generator and the Finc and FDec signals. On the Skyworks board, we used SPI to program the clock generator, although it also could have been programmed using I2C. For the Finc and Fdec signals the dedicated pins were used, which worked using a pulse per Finc/Fdec.

On the Trenz FMC, we need to use I2C to program the clock generator. This board does not have dedicated pins for Finc/Fdec, and thus those signals also need to be send over I2C.

Issue #411

TODO

The current implementation does not work, as I2C transactions are not acknowledged (rust code reports I2CError::NotAcknowledged). Since the I2C core in clash-cores passes tests, there is probably a bug in the I2C Wishbone interface (i2cWb). Debugging this problem is probably faster when the use GDB to program the Risc core (and for breakpoints).

  • Add software test set up and tear down (Add software test set up and tear down  #502)
  • Decrease the size of the fmc-clock binary
  • Fix bug where I2C transactions are not acknowledged (probably in i2cWb)
  • Fix bug where test fails because probe_test_done is not deasserted after first HITL test

@hiddemoll hiddemoll force-pushed the add-clock-board-i2c-interface branch 4 times, most recently from c5aa123 to 88e6fa3 Compare December 7, 2023 15:47
@lmbollen lmbollen force-pushed the add-clock-board-i2c-interface branch from dae550d to f91e82a Compare December 21, 2023 13:32
@hiddemoll hiddemoll force-pushed the add-clock-board-i2c-interface branch from f91e82a to 8b45bcb Compare February 1, 2024 09:21
@hiddemoll hiddemoll force-pushed the add-clock-board-i2c-interface branch from 8b45bcb to 9aa7d47 Compare March 13, 2024 15:42
hiddemoll and others added 3 commits April 22, 2024 14:07
Previously you could not know from which address the wishbone bus was reading and could not stall acknowledgements.
@hiddemoll hiddemoll force-pushed the add-clock-board-i2c-interface branch from 9aa7d47 to 211183d Compare April 23, 2024 11:45
@hiddemoll hiddemoll force-pushed the add-clock-board-i2c-interface branch 4 times, most recently from ddd9ede to eb5925a Compare April 24, 2024 13:49
This test should mirror FincFdecTests.hs but in software. Since HITL tests use
a VIO, the current test is communicated to the CPU using a control register. The
CPU communicates the status of the test back to the hardware using a status
register, so it can be captured by the VIO.

The frequency adjustments are slower over I2C compare to the dedicated pins on
the external clock board (Si5395J-A-EVB). To speed up the test, the step size
changed from 1ppb to 1ppm.
@hiddemoll hiddemoll force-pushed the add-clock-board-i2c-interface branch from eb5925a to 8560f30 Compare April 29, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants